﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NewVSS
{
    class Program
    {
        static void Main(string[] args)
        {

            string[] fileNames = {@"../../../datasets/iris_std_sh.txt",
                                  @"../../../datasets/ionosphere_std_sh.txt",
                                  @"../../../datasets/diabetes_std_sh.txt",
                                  @"../../../datasets/glass_std_sh.txt",
                                  @"../../../datasets/steelC14_std_sh.txt",
                                  @"../../../datasets/crime_std_sh.txt",
                                  @"../../../datasets/concrete_std_sh.txt",
                                 @"../../../datasets/a.txt"};

            string fileName = fileNames[4];
            int numEpochs = 20;
            int numHiddenNeurons = 4; //num of hidden neurons in each layer
            

            string headerLine;
            double[,] DataSet = Utils.LoadFile(fileName, out headerLine);
            bool classification = false;
            if (headerLine.ToLower().EndsWith("class"))
                classification = true;


            Network N = new Network(DataSet, numEpochs, numHiddenNeurons, classification, false);
            DateTime start = DateTime.Now;
            N.VSS();
            TimeSpan timeItTook = DateTime.Now - start;
            Console.WriteLine(timeItTook);
            Console.WriteLine();

            DateTime start2 = DateTime.Now;
            NetworkNoPointers N2 = new NetworkNoPointers(DataSet, numEpochs, numHiddenNeurons, classification, false);
            N2.VSS();
            TimeSpan timeItTook2 = DateTime.Now - start2;
            Console.WriteLine(timeItTook2);

            Console.ReadLine();
        }
    }
}
